#pragma once
#include "constant.hh"

class position_data
{
public:
	position_data()
	{
		x_nhits = 0;
		y_nhits = 0;
		z = 0;
		for (int i = 0; i < cMAX_CLUSTER; i++)
		{
			x[i] = 0;
			y[i] = 0;
			x_amp[i] = 0;
			y_amp[i] = 0;
			x_chn_num[i] = 0;
			y_chn_num[i] = 0;
			x_cluster_hole[i] = 0;
			y_cluster_hole[i] = 0;
		}
		x_hit_nhits = 0;
		y_hit_nhits = 0;
		for (int i = 0; i < 512; i++)
		{
			x_hit_strip[i] = 0;
			y_hit_strip[i] = 0;
			x_hit_amp[i] = 0;
			y_hit_amp[i] = 0;
		}
	};
	~position_data() {};
	int x_nhits;
	int y_nhits;
	double x[cMAX_CLUSTER];
	double y[cMAX_CLUSTER];
	double z;
	double x_amp[cMAX_CLUSTER];
	double y_amp[cMAX_CLUSTER];
	int x_chn_num[cMAX_CLUSTER];
	int y_chn_num[cMAX_CLUSTER];
	int x_cluster_hole[cMAX_CLUSTER];
	int y_cluster_hole[cMAX_CLUSTER];
	int x_hit_nhits;
	int y_hit_nhits;
	int x_hit_strip[512];
	int y_hit_strip[512];
	int x_hit_amp[512];
	int y_hit_amp[512];

	void show()
	{
		cout << "x_nhits: " << x_nhits << endl;
		cout << "y_nhits: " << y_nhits << endl;
		cout << "z: " << z << endl;
		cout << "x: ";
		for (int i = 0; i < x_nhits; i++)
		{
			cout << x[i] << " ";
		}
		cout << endl;
		cout << "y: ";
		for (int i = 0; i < y_nhits; i++)
		{
			cout << y[i] << " ";
		}
		cout << endl;
		cout << "x_amp: ";
		for (int i = 0; i < x_nhits; i++)
		{
			cout << x_amp[i] << " ";
		}
		cout << endl;
		cout << "y_amp: ";
		for (int i = 0; i < y_nhits; i++)
		{
			cout << y_amp[i] << " ";
		}
		cout << endl;
		cout << "x_chn_num: ";
		for (int i = 0; i < x_nhits; i++)
		{
			cout << x_chn_num[i] << " ";
		}
		cout << endl;
		cout << "y_chn_num: ";
		for (int i = 0; i < y_nhits; i++)
		{
			cout << y_chn_num[i] << " ";
		}
		cout << endl;
		cout << "x_cluster_hole: ";
		for (int i = 0; i < x_nhits; i++)
		{
			cout << x_cluster_hole[i] << " ";
		}
		cout << endl;
		cout << "y_cluster_hole: ";
		for (int i = 0; i < y_nhits; i++)
		{
			cout << y_cluster_hole[i] << " ";
		}
		cout << endl;

		cout << "x_hit_strip: ";
		for (int i = 0; i < x_hit_nhits; i++)
		{
			cout << x_hit_strip[i] << " ";
		}
		cout << endl;
		cout << "y_hit_strip: ";
		for (int i = 0; i < y_hit_nhits; i++)
		{
			cout << y_hit_strip[i] << " ";
		}
		cout << endl;
		cout << "x_hit_amp: ";
		for (int i = 0; i < x_hit_nhits; i++)
		{
			cout << x_hit_amp[i] << " ";
		}
		cout << endl;
		cout << "y_hit_amp: ";
		for (int i = 0; i < y_hit_nhits; i++)
		{
			cout << y_hit_amp[i] << " ";
		}
		cout << endl;
	}

private:
};
